import { ref } from 'vue'
import { defineStore } from 'pinia'

export const useNameStore = defineStore('name', () => {
  const firstName = ref('哈')

  function changeFirstName(xing) {
    firstName.value = xing
  }

  const lastName = ref('基米')

  function changeLastName(ming) {
    lastName.value = ming
  }

  return {
    firstName,
    lastName,
    changeFirstName,
    changeLastName
  }
})
